package br.com.ps.bombertournament.game;

import br.com.ps.bombertournament.game.animation.Action;

/**
 * Base Action class. 
 * 
 * @author Rennan Stefan Boni - rennanboni@gmail.com
 */
public abstract class BaseAction implements Action, Cloneable {

	/**
	 * Indicate if the action is already executed
	 */
	private boolean executed;
	/**
	 * Contains all parameters to action class execute 
	 */
	private WrapperMap parameters;

	public void setParameters(WrapperMap parameters) {
		this.parameters = parameters;
	}

	public boolean isExecuted() {
		return executed;
	}
	
	public void reset() {
		this.executed = false;
	}
	
	public WrapperMap getParameters() {
		return parameters;
	}

	public void setExecuted(boolean executed) {
		this.executed = executed;
	}

	@Override
	public BaseAction clone() {
		try {
			BaseAction result = (BaseAction) super.clone();

			return result;
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return null;
	}
}
